package com.xgame.controller.util;

import com.xgame.mybatis.model.ClientMoblieUser;
import com.xgame.util.URLAnalysis;

public class ClientUtil {
	public static void AnalysisUrl(String urlParamBase64,
			ClientMoblieUser clientMoblieUser) {
		URLAnalysis urlAnalysis = new URLAnalysis();
		urlAnalysis.analysisWithXorBase64(urlParamBase64);
		clientMoblieUser.setChannelId(urlAnalysis.getIntegerParam("CH"));
		clientMoblieUser.setImei(urlAnalysis.getParam("IMEI"));
		clientMoblieUser.setMac(urlAnalysis.getParam("MAC"));
		clientMoblieUser.setFirstClientType(urlAnalysis.getIntegerParam("CT"));
		clientMoblieUser.setCsId(urlAnalysis.getIntegerParam("BCH"));
		clientMoblieUser.setPhoneModel(urlAnalysis.getParam("PM"));
		clientMoblieUser.setImsi(urlAnalysis.getParam("IMSI"));
		clientMoblieUser.setOsVersion(urlAnalysis.getParam("OV"));
		clientMoblieUser.setPhoneVendor(urlAnalysis.getParam("PV"));
		clientMoblieUser.setScreenHeight(urlAnalysis.getIntegerParam("SH"));
		clientMoblieUser.setScreenWidth(urlAnalysis.getIntegerParam("SW"));
		clientMoblieUser.setServiceSupplier(urlAnalysis.getParam("SS"));
		clientMoblieUser.setPhone(urlAnalysis.getParam("PH"));
		clientMoblieUser.setNetType(urlAnalysis.getParam("NT"));
		clientMoblieUser.setOsVersion(urlAnalysis.getParam("OS"));
	}
}
